'''

from store.models import Item, Carthasitem, Cart,Promotion,User,Showcase,Collection,Category,Seasonal,\
    Promotionhasshowcase, Itemhaspromotion, Itemhasshowcase, Categoryhasitem
from django.contrib import admin
from django.contrib.sites.models import Site

class ItemAdmin(admin.ModelAdmin):
    fields = ('short_description',)
    list_display = ('description','id')
    list_display_links =('description',)
'''
#admin.site.register(Item)

#admin.site.register(Collection)

#admin.site.register(Seasonal)
'''
admin.site.unregister(Site)
#admin.site.register(Itemhaspromotion)
#admin.site.register(Categoryhasitem)
class Item_CartInline(admin.TabularInline):
    model=Cart.items.through
class CartAdmin(admin.ModelAdmin):
    inlines=[Item_CartInline,]
    exlude=('items',)
class ShowcaseProInline(admin.TabularInline):
    model=Promotion.show_cases.through
class ShowcaseInline(admin.TabularInline):
    model=Item.show_cases.through
class ItemInline(admin.TabularInline):
    model=Category.items.through
class PromotionInline(admin.TabularInline):
    model=Item.promotions.through
class CategoryAdmin(admin.ModelAdmin):
    inlines=[ItemInline,]
    exclude=('items',)
class ItemAdmin(admin.ModelAdmin):
    inlines=[ItemInline,PromotionInline,ShowcaseInline,Item_CartInline]
    exclude=('promotions','show_cases')
class PromotionAdmin(admin.ModelAdmin):
    inlines=[PromotionInline,ShowcaseProInline]
    exclude=('show_cases',)
class ShowcaseAdmin(admin.ModelAdmin):
    inlines=[ShowcaseInline,ShowcaseProInline]
admin.site.register(Category, CategoryAdmin)
admin.site.register(Item, ItemAdmin)
#admin.site.register(Category)
admin.site.register(Promotion,PromotionAdmin)
admin.site.register(Showcase,ShowcaseAdmin)
admin.site.register(Cart,CartAdmin)
'''
from cart.models import Carthasitem,Cart,Item
from store.models import Item,User,Showcase,Collection,Category,Seasonal,\
    Promotionhasshowcase,  Categoryhasitem, Artical
from django.contrib import admin
from django.contrib.sites.models import Site
class ItemInline(admin.TabularInline):
    model=Cart.items.through
    
class ArticalInline(admin.TabularInline):
       model=Cart.items.through
class ItemAdmin(admin.ModelAdmin):
    inlines=[ArticalInline,]
    
    

  
class CartAdmin(admin.ModelAdmin):
    inlines=[ArticalInline,]
    exlude=('items',)
class ArticalAdmin(admin.ModelAdmin):
    pass
admin.site.register(Item, ItemAdmin)
admin.site.register(Cart,CartAdmin)
admin.site.register(Artical,ArticalAdmin)